package com.xtc.springcloud.dubbo;

import com.xtcedu.springcloud.dubbo.service.ISayHelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 */
@RestController
@SpringBootApplication
public class SpringCloudDubboConsumerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringCloudDubboConsumerApplication.class, args);
    }

    @Reference
    ISayHelloService sayHelloService;

    @RequestMapping("/say")
    public String say() {
        return sayHelloService.sayHello("xtc");
    }

}
